import request from '@/utils/request'

// 查询二级节点管理列表
export function listTagNode(query) {
  return request({
    url: '/business/tagNode/list',
    method: 'get',
    params: query
  })
}

// 查询二级节点管理详细
export function getTagNode(id) {
  return request({
    url: '/business/tagNode/' + id,
    method: 'get'
  })
}

// 新增二级节点管理
export function addTagNode(data) {
  return request({
    url: '/business/tagNode',
    method: 'post',
    data: data
  })
}

// 修改二级节点管理
export function updateTagNode(data) {
  return request({
    url: '/business/tagNode',
    method: 'put',
    data: data
  })
}

// 修改二级节点状态
export function changeStatus(id, tagNodeStatus) {
  const data = {
    id,
    tagNodeStatus
  }
  return request({
    url: '/business/tagNode/changeStatus',
    method: 'put',
    data: data
  })
}

// 删除二级节点管理
export function delTagNode(id) {
  return request({
    url: '/business/tagNode/' + id,
    method: 'delete'
  })
}
